package com.crowntit.domain.activity.model.valobj;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum DiscountTypeEnum {

    BASE(0, "基础优惠"),
    TAG(1, "人群标签"),
    ;

    private Integer code;
    private String desc;

    public static DiscountTypeEnum get(Integer code){
        switch (code){
            case 0:
                return DiscountTypeEnum.BASE;
            case 1:
                return DiscountTypeEnum.TAG;
            default:
                throw new RuntimeException("err Code!");
        }
    }
}
